package es.htic.iplusd.codekatas.primefactors.business;

import java.util.List;

public interface PrimeFactorsBO {

	/**
	 * Returns true if the given number is a Prime Number.
	 *  - A prime is a natural number that has exactly two distinct natural number divisors: 1 and itself.
	 * 		- The natural numbers are the ordinary whole numbers used for counting and ordering elements of a set.
	 * 			- There is no universal agreement about whether to include zero in the set of natural numbers: some define the natural numbers to be the positive integers {1, 2, 3, ...}, while for others the term designates the non-negative integers {0, 1, 2, 3, ...}
	 * @param number
	 * @return
	 */
	public boolean isPrimeNumber (int number);

	/**
	 * Returns a list sorted ASC with all prime factors of the given number, so they can be duplicated.
	 * 	- A Prime Factor of a given number is a Prime Number by which the given number is divisible
	 * 		(the modulus of the division is 0).  
	 * 	- (i.e for the given number "12" this method should return "2, 2, 3")
	 */
	public List<Integer> getPrimeFactors (int number);

	/**
	 * Returns a list with all prime factors of the given number, so they can be duplicated.
	 * 	- A Prime Factor of a given number is a Prime Number by which the given number is divisible
	 * 		(the modulus of the division is 0).  
	 *  - Result list is sorted as the given criteria.
	 *  - Sort Criteria can be consulted on es.htic.arq.util.ListUtils.
	 */
	public List<Integer> getPrimeFactors (int number, int sortedByCriteria);

	/**
	 * Returns a list sorted ASC with all the primer numbers minors than a given number.
	 *  - A prime is a natural number that has exactly two distinct natural number divisors: 1 and itself.
	 * 		- The natural numbers are the ordinary whole numbers used for counting and ordering elements of a set.
	 * 			- There is no universal agreement about whether to include zero in the set of natural numbers: some define the natural numbers to be the positive integers {1, 2, 3, ...}, while for others the term designates the non-negative integers {0, 1, 2, 3, ...}
	 * @param number
	 * @return
	 */
	public List<Integer> getListPrimeNumbersMinorsThan (int number);

}